'''------------------------------------------------------------------------------------------------
 $ @Author: your name
 $ @Date: 2021-12-22 15:30:25
 $ @LastEditTime: 2022-01-04 14:12:35
 $ @LastEditors: Please set LastEditors
 $ @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 $ @FilePath: \YSQTrackerEvaluationToolKit_v1.0\GetCfg\setParam.py
--------------------------------------------------------------------------------------------------'''
import argparse

def getParam():
    param = argparse.ArgumentParser("add param")
    param.add_argument(
        '-fit',
        '--failureIOUThreshold',
        default=0.1,
        type=float,
        help = '判断为失败帧的IOU阈值'
    )

    param.add_argument(
        '-fps',
        '--fps',
        default=25,
        type = int,
        help = '输出可视化结果为视频文件时，指定的视频文件帧率'
    )
    #* 可视化结果输出形式-> imgFile 为图像集合； video 为视频文件; N 不输出;B 两个格式都输出
    param.add_argument(
        '-ovrf',
        '--OutputVisualizationResultsFormat',
        default='video',
        help = '可视化结果输出形式-imgFile,video,N,B'
    )
    param.add_argument(
            '-cim',
            '--CalculatingIndexMethod',
            default={
                'ACC':'Threshold',
                'SUCC':'Integral'},
            type = str,
            help= '计算指标的方法，若使用卡阈值的方式:Threshold，计算曲线积分:Integral'
        )
    param.add_argument(
            '-ffnt',
            '--failureFrameNumThreshold',
            default=10,
            type = int,
            help = "判定每个视频为失败视频的帧数阈值"
        )
    param.add_argument(
            '-vnld',
            '--videosNameListDir',
            default=r'.\GETCFG\videosNameList01.yaml',
            type = str,
            help = " "
        )
    param.add_argument(
            '-tsd',
            '--testSetDir',
            default=r'F:\tracking_test_DataSet\OTB100_v0',
            type = str,
            help = "OTB数据集的root dir"
        )
    param.add_argument(
            '-tbd',
            '--trackerBboxDir',
            default={
                    # 'siamfc':r'D:\Experimaental_Data\P_SiamFc\siamfc_0.5_biaozhun',
                    # 'siamfc_retrans':r'D:\Experimaental_Data\P_SiamFc\2022_2_7_addEmbedding',
                    # 'siamfcpp':r'D:\ExpData\Siamfcpp_alexnet-got',
                    # 'siamfcpp_retrans':r'D:\ExpData\siamfcpp_alexnet-got-update_ClsTemp-checkDst',
                    'LSTM_STATE_PRE':r'D:\ExpData\LSTM_v1_got10K',
                    #'PF_STATE_PRE':r'D:\ExpData\pf_predict_v1',
                    'C-COT':r'./tarckers/CCOT',
                    # 'DaSiamRPN': r'.\tarckers\DaSiamRPN',
                    # 'ECO':r'D:\PY_HC\YSQTrackerEvaluationToolkit\tarckers\ECO',
                    # 'ECO-HC':r'D:\PY_HC\YSQTrackerEvaluationToolkit\tarckers\ECO-HC',
                    # 'MDNet':r'D:\PY_HC\YSQTrackerEvaluationToolkit\tarckers\MDNet',
                    # 'Ocean':r'D:\PY_HC\YSQTrackerEvaluationToolkit\tarckers\Ocean',
                    # 'RTMDNet':r'D:\PY_HC\YSQTrackerEvaluationToolkit\tarckers\RTMDNet',
                    # 'SiamBAN':r'D:\PY_HC\YSQTrackerEvaluationToolkit\tarckers\SiamBAN',
                    # 'siamRCNN':r'D:\PY_HC\YSQTrackerEvaluationToolkit\tarckers\siamRCNN',
                    # 'SiamRPN':r'D:\PY_HC\YSQTrackerEvaluationToolkit\tarckers\SiamRPN',
                    # 'SiamRPN++':r'D:\PY_HC\YSQTrackerEvaluationToolkit\tarckers\SiamRPN++',
                    # 'SiamFC-3S':r'D:\PY_HC\YSQTrackerEvaluationToolkit\tarckers\SiamFC-3S',
                    # 'UPDT':r'D:\PY_HC\YSQTrackerEvaluationToolkit\tarckers\UPDT',
                    # 'siamfc':r'D:\Experimaental_Data\P_SiamFc\siamfc_0.5_biaozhun',
                    # 'our': r'D:\Experimaental_Data\P_SiamFc\2021_12_1_addEmbedding',
                    # 'OnlineUpdate':r'C:\Users\Administrator\Desktop\litongANs\txt—updata',
                    # 'NoUpudate':r'C:\Users\Administrator\Desktop\litongANs\txt'
            },

            help = "这是一个字典，key为跟踪器的名字，key对应的str为该跟踪器prebox存放的地址"
        )
    param.add_argument(
        '-sfef',
        '--starFrameAndEndFrame',
        default={
            'David': [299,0],
            'Football1':[0,73],
            'Human4':[0,666]
        }
    )
    param.add_argument(
        '-c',
        '--challenge',
        default={'OTB':'all videos',
        'IV':'Illumination Variation - the illumination in the target region is significantly changed.',
        'SV':'Scale Variation - the ratio of the bounding boxes of the first frame and the current frame is out of the range ts, ts > 1 (ts=2).',
        'OCC':'Occlusion - the target is partially or fully occluded.',
        'DEF':'Deformation - non-rigid object deformation.',
        'MB': 'Motion Blur - the target region is blurred due to the motion of target or camera.',
        'FM': 'Fast Motion - the motion of the ground truth is larger than tm pixels (tm=20).',
        'IPR': 'In-Plane Rotation - the target rotates in the image plane.',
        'OPR': 'Out-of-Plane Rotation - the target rotates out of the image plane.',
        'OV': 'Out-of-View - some portion of the target leaves the view.',
        'BC': '	Background Clutters - the background near the target has the similar color or texture as the target.',
        'LR': 'Low Resolution - the number of pixels inside the ground-truth bounding box is less than tr (tr =400).'}
    )
    # param.add_argument(
    #         '--color',
    #         default=[
    #         (0, 255, 255),
    #         (0, 255, 0),
    #         (255, 0, 0),
    #         (255, 0, 255),
    #         (255, 255, 0),
    #         (0, 0, 128),
    #         (0, 128, 0),
    #         (128, 0, 0),
    #         (0, 128, 128),
    #         (128, 0, 128),
    #         (128, 128, 0),
    #         (18,153,255),
    #         (3,97,255),
    #         (205,90,106),
    #         (15,94,56),
    #         (84,46,8),
    #         (96,48,176),
    #         (97,38,135),
    #         (18,74,115),
    #         ],
    #         type = list
    #     )
    return param.parse_args()